//
//  AppDelegate.m
//  QiniuTool
//
//  Created by 周渊 on 14/12/31.
//  Copyright (c) 2014年 周渊. All rights reserved.
//

#import "AppDelegate.h"
#import "AXStatusItemPopup.h"
#import "ViewController.h"
@interface AppDelegate (){
    AXStatusItemPopup *_statusItemPopup;
}

@end

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    // Insert code here to initialize your application
    
    NSStoryboard* mainStoryboard = [NSStoryboard storyboardWithName:@"Main" bundle:nil];
    ViewController *vc = [mainStoryboard instantiateControllerWithIdentifier:@"ViewController"];
    
    
    NSImage *image = [NSImage imageNamed:@"cloud"];
    NSImage *alternateImage = [NSImage imageNamed:@"cloudgrey"];
    
    _statusItemPopup = [[AXStatusItemPopup alloc] initWithViewController:vc image:image alternateImage:alternateImage];
    
    // globally set animation state (optional, defaults to YES)
    //_statusItemPopup.animated = NO;
    
    //
    // --------------
    
    // optionally set the popover to the contentview to e.g. hide it from there
    
    vc.statusItemPopup = _statusItemPopup;
}

- (void)applicationWillTerminate:(NSNotification *)aNotification {
    // Insert code here to tear down your application
}

@end
